﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;


namespace Camc.Quality.RecordTable.FormEntity
{
 public   class 电缆剥线试验记录表低频 : TableBase
    {
        public 电缆剥线试验记录表低频(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string secondToolUsed, string toolUsed)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;
            SecondToolUsed = secondToolUsed;
            ToolUsed = toolUsed;
        }

        public override string FormName { get; protected set; } = "电缆剥线试验记录表低频";

        #region A12_测量工具编号
        public override string ToolUsed_DisplayName { get; protected set; } = "测量工具编号";
        public override bool ToolUsed_Show { get; protected set; } = true;
        public override bool ToolUsed_Enable { get; protected set; } = true;
        public override int ToolUsed_Property { get; protected set; } = 2;
        #endregion

        #region A15_剥线钳编号
        public override string SecondToolUsed_DisplayName { get; protected set; } = "剥线钳编号";
        public override bool SecondToolUsed_Show { get; protected set; } = true;
        public override bool SecondToolUsed_Enable { get; protected set; } = true;
        public override int SecondToolUsed_Property { get; protected set; } = 2;
        #endregion
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation">导线编号</param>
        /// <param name="recordRequire">记录要求</param>
        /// <returns></returns>
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity, string recordLocation)
        {
            //TODO 确认编号Enable属性
            entity.SetRecordLocation(recordLocation, "导线编号", false, true, 1);
          
            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues">剥线长度1</param>
        /// <param name="secondMeasuredValues">剥线长度2</param>
        /// <param name="confirmResult">检查结果</param>
        /// <returns></returns>
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string firstMeasuredValues, string confirmResult)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "剥线长度1精确到0.5mm", true, true, 0);
            entity.SetConfirmResult(confirmResult, "检查导线绝缘层切除后的外观情况", true, true, 0);
        

            return entity;
        }
        /// <summary>
        /// 多媒体
        /// </summary>
        /// <param name="measuredValues"></param>
        public MultiMediaEntity SetMultiMedia(MultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "多媒体（两端皆要拍照）", true, true, 0);
            return entity;
        }

        /// <summary>
        /// 三检
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public InspectionSignatureEntity SetInspectionSignature(InspectionSignatureEntity entity)
        {
            entity.InspectionSignatureName = "三检";
            entity.SetFirstOperator(null, "操作者", true, true, 0, null, "操作者操作时间", true, true, 0);
            entity.SetSecondOperator(null, "互检者", true, true, 0, null, "互检者操作时间", true, true, 0);
            entity.SetThirdOperator(null, "检验员", true, true, 0, null, "检验员操作时间", true, true, 0);
            return entity;
        }
    }
}
